#ifndef __INF_W25Q32_H__
#define __INF_W25Q32_H__

#include "spi.h"

void Inf_W25Q32_Init(void);

/// @brief 获取硬件ID
/// @param mid 厂商ID
/// @param did 设备ID
void Inf_W25Q32_ReadID(uint8_t *mid,uint16_t *did);

/// @brief  擦除指定块内的指定扇区 * 一共64块(0-63) 每块16个扇区(0-15)  每个扇区16页(0-15)  每页256个字节
/// @param block 块
/// @param sector 扇区
void Inf_W25Q32_EraseSector(uint8_t block, uint8_t sector);

/// @brief 页写入 写入时,从指定页的首地址开始写入
/// @param block 
/// @param sector 
/// @param page 
/// @param data 
/// @param len 
void Inf_W25Q32_WritePage(uint8_t block, uint8_t sector, uint8_t page, uint8_t *data, uint16_t len);

/// @brief 
/// @param block 
/// @param sector 
/// @param page 
/// @param data 
/// @param len 
void Inf_W25Q32_Read(uint8_t block, uint8_t sector, uint8_t page, uint8_t *data, uint16_t len);
#endif /* __INF_W25Q32_H__ */
